package com.atguigu.gmall.feign.ware;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @Author:lyd
 * @Date:2023/9/4 20:52
 * @Version:1.0
 * @Description 第三方系统不属于微服务集群。没有注册到nacos,所以需要指名需要的地址
 **/
@FeignClient(value = "ware-manage", url = "http://localhost:9001")
public interface WareFeignClient {

    //http://localhost:9001/hasStock?skuId=43&num=2
    @GetMapping("/hasStock")
    String hasStock(@RequestParam("skuId") Long skuId, @RequestParam("num") Integer num);
}
